<template>
  <div style="width:95%;margin:0 auto;">
    <div style="padding:10px;" v-html="pInfo"></div>
  </div>
</template>
<script>
import { articlExample } from "../api/api";
export default {
  data() {
    return {
      pInfo: ""
    };
  },
  props: {
    id: Number
  },
  mounted() {
    this.getinfo();
  },
  methods: {
    async getinfo() {
      let data = await articlExample({ cid: this.id });
      this.pInfo = data.data.data[0].content;
      
      this.pInfo =  (this.pInfo).replace(/<img/,'<img style="max-width:100%;height:auto"');
            // this.pInfo =  (this.pInfo).replace(/<img/,'<img style="width:100%;height:none!important"');
    }
  }
};
</script>
<style scoped>
</style>